﻿using BCCommon;
using BCDto.Sim.Admin.AdminPermissionMappingPage;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.Sim.Admin.AdminPermissionMappingPage
{
    /// <summary>
    /// 员工权限页面映射
    /// </summary>
    public interface IAdminPermissionMappingPageService
    {
        /// <summary>
        /// 检查员工权限页面映射是否存在
        /// </summary>
        /// <param name="pagePathCode">页面路径码</param>
        /// <returns></returns>
        bool CheckExists(string pagePathCode);
        /// <summary>
        /// 检查员工权限页面映射是否存在
        /// </summary>
        /// <param name="permissionCode">权限码</param>
        /// <returns></returns>
        bool CheckPermissionCodeExists(string permissionCode);
        /// <summary>
        /// 添加员工页面权限映射
        /// </summary>
        /// <param name="requestDto">员工页面权限映射</param>
        /// <returns></returns>
        AdminPermissionMappingPageDto Add(AdminPermissionMappingPageRequestDto requestDto);
        /// <summary>
        /// 修改员工页面权限映射
        /// </summary>
        /// <param name="putDto">目标员工页面权限映射</param>
        /// <returns></returns>
        AdminPermissionMappingPageDto Update(AdminPermissionMappingPagePutDto putDto);
        /// <summary>
        /// 删除员工页面权限映射
        /// </summary>
        /// <param name="adminPermissionMappingPageId">员工页面权限映射Id</param>
        void Delete(long adminPermissionMappingPageId);
        /// <summary>
        /// 获取员工页面权限映射列表（分页）
        /// </summary>
        /// <param name="permissionCode">权限编码</param>
        /// <param name="pathLevel">路径级别</param>
        /// <param name="parentPathCode">父级路径</param>
        /// <param name="fixedParentPathCode">固定父级编码查询</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        PageableList<AdminPermissionMappingPageDto> Query(string permissionCode, string parentPathCode, bool fixedParentPathCode, int? pathLevel, int pageIndex = 1, int pageSize = 10);
        /// <summary>
        /// 获取员工页面权限映射列表
        /// </summary>
        /// <returns></returns>
        IEnumerable<AdminPermissionMappingPageViewDto> GetList(int? departmentId);

        /// <summary>
        /// 获取指定员工页面权限列表
        /// </summary>
        /// <param name="adminId">员工Id</param>
        /// <param name="staffOrganizationMappingRecordId">员工组织映射记录Id</param>
        /// <returns></returns>
        (IEnumerable<StaffRolePermissionPageRecordDto>, List<PageMenuDto>) GetAdminPagePermissions(long? adminId, long? staffOrganizationMappingRecordId);
        /// <summary>
        /// 修改页面顺序
        /// </summary>
        /// <param name="dtos">相邻页面权限列表</param>
        /// <returns></returns>
        void UpdatePageOrder(IEnumerable<AdminPermissionMappingPageDto> dtos);
        /// <summary>
        /// 修改页面顺序
        /// </summary>
        /// <param name="dto">相邻页面权限</param>
        /// <returns></returns>
        void UpdatePageOrder(AdminPermissionMappingPageDto dto);
    }
}
